package com.xdf.springsecuritydemo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author chanchaw
 * @create 2025-09-21 8:18
 */
@RequestMapping("/sign")
@Controller
public class SignController {
    @PostMapping("/in")
    public String login(){
        System.out.println("sign controller login");
        return "redirect:index.html";
    }
    @PostMapping("/out")
    public String logout(){
        System.out.println("退出登录");
        return "redirect:mylogin.html";
    }
    //@PostMapping("/loginSuccess")
    @RequestMapping("/loginSuccess")
    public String loginSuccess(){
        System.out.println("sign controller loginSuccess");
        return "redirect:/index.html";
    }
    @GetMapping("/thymeleafdemo")
    public String thymeleafDemo(){return "thymeleafdemo";}

    @GetMapping("/thymeleaflogin")
    public String thymeleaflogin(){return "thymeleaflogin";}
}
